<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
   d页面
   <script>
       //window.onmessage接收c传进来的参数
     window.onmessage=function(ev){
         
         console.log(ev.data);//通过postMessage传递进来的参数
         if(ev.data){
            console.log(ev.origin);//谁传的
            //ev.source.postMessage 再返回给c页面结果
             ev.source.postMessage('我是d返回给c的数据', ev.origin)
      
         }
     }
   </script>
   
</body>
</html>